package com.zhoushihao.class0811;

public class Point {
    public double x;
    public double y;

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public String toString() {
        return "Point{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
    public double getDistance(Point other){
        return Math.sqrt(Math.pow(this.x - other.x,2)+Math.pow(this.y - other.y,2));
    }
}
